I have an unavoidably large docker image layer (2.4GB). When I push the image to my paid docker hub registry account (support is non-existent on this issue), it pushes at about 1MB per second, and about half way through times out and starts re-trying. It does this about 5 times before giving up.
I used to be able to push the layer--I think perhaps I am at some threshold where, depending on the docker upload speed, sometimes I timeout and sometimes I don't. It seems like an old problem https://github.com/docker/distribution/issues/469 but solution is inconclusive.
Here's what times out:
docker push metalaureate/yard-stats:latest
The push refers to repository [docker.io/metalaureate/yard-stats]
68aa0af45ea8: Preparing
68aa0af45ea8: Pushing [==> ] 137.7MB/2.492GB
c8902f34de3c: Layer already exists
239c6e8c7ca5: Layer already exists
c1c31e2fe28c: Pushed
88176e364a30: Pushing [==========> ] 203.9MB/970.9MB
981eff82d876: Layer already exists
c11aa0d1cbc2: Layer already exists
8bc59dd7b32b: Layer already exists
de9ab7da6a52: Layer already exists
86cf19f333cc: Layer already exists
4b8e4d51fbe2: Layer already exists
cf5b3c6798f7: Layer already exists
My Dockerfile looks like this:
FROM andrejreznik/python-gdal:stable
RUN apt-get update -y && apt-get install -y libsm6 libxext6 libxrender-dev && apt-get install -y curl nginx
WORKDIR /
COPY ./ /
COPY nginx.conf /etc/nginx
RUN pip install -r ./requirements.txt
CMD ["./start.sh"]
EDIT:
I tried encapsulate the 2.4GB layer in a separate image and derive my yard-stats image from that, on the theory that docker wouldn’t try to push up the image that it was deriving from, but that didn’t help.